var Struct = require('struct');

// fe01000e4e2100010a0208001200

var wechatData = Struct()
  .word8('Magic')
  .word8('Version')
  .word16Ube('Length')
  .word16Ube('CmdID')
  .word16Ube('Seq');


wechatData.allocate();
var buf = wechatData.buffer();
var proxy = wechatData.fields;
proxy.Magic = 0xFE;
proxy.Version = 1;
proxy.Length = 0x0e;
proxy.CmdID = 0x4e21;
proxy.Seq = 1;

console.log(buf);
